import request from '@/utils/request'

// 创建市场类型
export function createmarketType(data) {
  return request({
    url: '/market/type/create',
    method: 'post',
    data: data
  })
}

// 更新市场类型
export function updatemarketType(data) {
  return request({
    url: '/market/type/update',
    method: 'put',
    data: data
  })
}

// 删除市场类型
export function deletemarketType(id) {
  return request({
    url: '/market/type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得市场类型
export function getmarketType(id) {
  return request({
    url: '/market/type/get?id=' + id,
    method: 'get'
  })
}

// 获得市场类型分页
export function getmarketTypePage(params) {
  return request({
    url: '/market/type/page',
    method: 'get',
    params
  })
}
// 导出市场类型 Excel
export function exportmarketTypeExcel(params) {
  return request({
    url: '/market/type/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
